package com.zhuojy.equity.mall.admin.web.controller;

import com.zhuojy.equity.mall.admin.common.pojo.ResultEntity;
import com.zhuojy.equity.mall.admin.service.menu.MenuService;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 后台菜单管理Controller
 */
@RestController
@RequestMapping("/menu")
@RequiredArgsConstructor
@Api(tags = "菜单模块")
public class MenuController {

	private final MenuService menuService;

	/**
	 * 根据父级id查询对应的菜单
	 * @param id 父级id
	 * @return	ResultEntity
	 */
	@RequestMapping("queryMenuById")
	public ResultEntity queryMenuById(@RequestParam("id") String id){
		return menuService.queryMenuById(id);
	}

}
